using System;
using System.Collections.Generic;
using System.Text;

using Sandia.MVCFramework.Data;
using Sandia.MVCFramework.Request;

namespace Sandia.MVCFramework.Common
{
    /// <summary>
    /// Defines the interface for MVC Framework elements that
    /// process incoming requests
    /// </summary>
    public interface IRequestProcessor: IDisposable
    {
        /// <summary>
        /// The IRequest types that this RequestProcessor would like to process.
        /// </summary>
        IList<Type> DesiredRequests
        {
            get;
        }

        /// <summary>
        /// Processes an incoming request
        /// </summary>
        /// <param name="request">The IRequest to process</param>
        void ProcessRequest(IRequest request);

        /// <summary>
        /// Whether or not this item has been disposed
        /// </summary>
        bool IsDisposed
        {
            get;
        }

        /// <summary>
        /// Called while disposing.
        /// </summary>
        event EventHandler Disposed;
    }
}
